include io16.inc

.data
    week db 'Sun', 0, 'Mon', 0, 'Tue', 0, 'Wed', 0, 'Thu', 0, 'Fri', 0, 'Sat', 0

.code 
read macro addr
    mov al, addr
    out 70h, al
    in al, 71h
endm

space macro char
    mov al, char
    call dispc
endm

start:
    mov ax, @data
    mov ds, ax
again:
    xor eax, eax
    read 9
    call disphb
    space '-'
    read 8
    call disphb
    space '-'
    read 7
    call disphb
    space ' '
    read 6
    mov ebx, offset week
    dec eax
    shl eax, 2
    add ebx, eax
    mov eax, ebx
    call dispmsg
    space ' '
    read 4
    call disphb
    space ':'
    read 2
    call disphb
    space ':'
    read 0
    call disphb

    call readc
    jmp again
    exit 0
end start